<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    var n1=Number(prompt("请输入数字一"))
    var n2=Number(prompt("请输入数字二"))
    if(n1<n2){
        for(i=n1;i<=n2;i++){
            document.write(i+"&emsp;")
        }
    }else{
        for(i=n1;i>=n2;i--){
            document.write(i+"&emsp;")
        }
    }
</script>